Imports TeamUp.Fachada

Public Class WebPesquisarUsuario
    Inherits Frame.WEBClient.WEBform

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub
    Protected WithEvents btnSelecionar As TeamControls.FWT.WebControls.TButton
    Protected WithEvents btnVoltar As TeamControls.FWT.WebControls.TButton
    Protected WithEvents grdUsuario As TeamControls.FWT.WebControls.TDataGrid

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        If Not Page.IsPostBack Then
            Dim strNomePagina As String = TPaginaOrigem()
            If strNomePagina = "webCadastro.aspx" Then
                Dim objFachada As Facade = Facade.getInstance
                Dim dsResultado As Data.DataSet

                dsResultado = objFachada.consultarUsuario()

                If dsResultado.Tables(0).Rows.Count > 0 Then
                    grdUsuario.DataSource = dsResultado
                    grdUsuario.DataBind()
                Else
                    grdUsuario.MostraEmBranco()
                End If


            End If
        End If
    End Sub

    Private Sub btnVoltar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVoltar.Click
        TVoltar()
    End Sub

    Private Sub btnSelecionar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelecionar.Click
        TGuardarParametro(Parametro("codigo", grdUsuario.SelectedItem.Cells(3).Text))
        TVoltar()
    End Sub
End Class
